package com.hnevc.mallserver3.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ApiModel(value = "CartDTO", description = "评论详情信息")
public class CommentDTO {
    @ApiModelProperty(value = "评论编号")
    private Long id;
    @ApiModelProperty(value = "商品名称")
    private String goodsName;
    @ApiModelProperty(value = "商品ID")
    private String goodsId;
    @ApiModelProperty(value = "商品图片")
    private String icon;
    @ApiModelProperty(value = "评论内容")
    private String comment;
    @ApiModelProperty(value = "评论者ID")
    private String memberId;
    @ApiModelProperty(value = "评论者姓名")
    private String username;
    @ApiModelProperty(value = "发表时间")
    @DateTimeFormat(pattern = "YYYY-mm-DD HH:MM:SS")
    @JsonFormat(pattern = "YYYY-mm-dd HH:MM:SS")
    private Date postdate;
    // 省略getter和setter方法
}
